<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>login</title>
    <link rel="stylesheet" th:href="@{/webjars/layui/2.4.5/css/layui.css}">
    <link rel="stylesheet" th:href="@{/static/css/login.css}">
    <style type="text/css">
        .login-form{
            width: 375px;
            margin:0 auto;
            box-sizing: border-box;
            padding: 300px 0;
        }

        button{
            width: 100px;
            margin: 0 auto;
        }
    </style>
</head>
<body class="layui-body" id="body">
    <div class="login-form">


   <form action="/sys/login" method="post" >
       <div >
           <input type="text" name="username" placeholder="用户名"   style="width: 200px">
       </div>
       <div >
           <input type="password" name="password"  placeholder="密码"  style="width: 200px">
       </div>
       <button type="submit" >登录</button>
   </form>
    </div>

</body>

<script th:src="@{/webjars/layui/2.4.5/layui.js}"></script>
<script th:src="@{/webjars/vue/2.5.16/vue.js}"></script>
<script th:src="@{/webjars/jquery/3.3.1-2/jquery.js}"></script>

<script>

    layui.use('element', function () {
        var element = layui.element;
    });
    // function login() {
    //     $.ajax({
    //         type: 'POST',
    //         async: false,
    //         dataType: 'json',
    //         url: "/sys/login?username=" + app.username+"&password="+app.password,
    //         success: function(data){
    //             alert(JSON.stringify(data))
    //         },
    //         error: function(err){
    //
    //         }
    //     });
    // }
    //
    // var app = new Vue({
    //     el:"#body",
    //     data:{
    //         username:"admin",
    //         password:"123456"
    //     },
    //     methods:{
    //     },
    //     created:function () {
    //     }
    // })
</script>
</html>